# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=osinfo-db-tools
pkgver=1.8.0
pkgrel=0
pkgdesc="Tools for managing the osinfo database"
url="https://libosinfo.org/"
arch="all"
license="GPL-2.0-or-later"
makedepends="
	meson
	glib-dev
	libxml2-dev
	libarchive-dev
	libxslt-dev
	json-glib-dev
	libsoup-dev
	perl
	"
checkdepends="py3-pytest py3-requests"
subpackages="$pkgname-doc $pkgname-lang"
source="https://gitlab.com/libosinfo/osinfo-db-tools/-/archive/v$pkgver/osinfo-db-tools-v$pkgver.tar.gz"
builddir="$srcdir/osinfo-db-tools-v$pkgver"

build() {
	meson \
		--prefix=/usr \
		--buildtype=plain \
		. output
	ninja -C output
}

check() {
	ninja -C output test
}

package() {
	DESTDIR="$pkgdir" ninja -C output install
}

sha512sums="ce2adec28f50cdc071fda677aadb82918ed6f48361c62a52a064c07d1cf4d7d5ab6a0f8a6add599fbed74e5a787b17b864a67a94129266aafab24de3688d6a0b  osinfo-db-tools-v1.8.0.tar.gz"
